package core.command
{
	import core.event.SocketEventID;
	import core.event.UnoEvent;
	import core.event.ViewEventID;
	
	public class CreateTableCommand extends SuperCommand
	{
		public function CreateTableCommand()
		{
			socketEvent = SocketEventID.CREATE_DESK_SUCCESS;
			viewEvent = ViewEventID.CREATE_DESK_SUCCESS;
			
		}
		override public function success(e:UnoEvent):void
		{
			//db.currentTable = e.data;
			db.tableList[e.data.tableID] = e.data;
			var user:Object = db.userList[e.data.createrID];
			user.ready="1";
			user.tableID = e.data.tableID;
			user.seatID = "1";
			db.loginUser.setup(user);
		}
	}
}